const { mysql } = require('../qcloud')

module.exports = async (ctx, next) => {
  var bookStatus = ctx.request.body.bookStatus;
  var id = ctx.request.body.id;
  await mysql('book').update({ bookStatus: bookStatus }).where({id: id}).then(res => {
    ctx.state.data = res;
  })
}
